/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

import javax.microedition.lcdui.Display;
import javax.microedition.midlet.*;

/**
 * @author khang
 */
public class Touhou extends MIDlet {
    private Display display;
    private PlayCanvas Playcanvas;
    private boolean isFirstStart=true;

    public void startApp() {
        if(isFirstStart){
            display=Display.getDisplay(this);
            Playcanvas=new PlayCanvas(this);
            Playcanvas.gameStart();
            display.setCurrent(Playcanvas);
            isFirstStart=false;
        }
    }
    
    public void pauseApp() {
    }
    
    public void destroyApp(boolean unconditional) {
    }
    public void Exit(){
        destroyApp(true);
        notifyDestroyed();
    }
}
